﻿@{
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="box-body">
    <div id="searchbar" class="searchbar">
        <input type="text" id="id1" name="" placeholder="编号">
        <input type="text" id="id2" placeholder="用户名" class="form-control">
        <input class="Wdate" type="text" placeholder="请选择日期" onclick="WdatePicker()" />

        <a id="btnSearch" author="S" class="btn btn-primary">查询</a>
        <a id="btnAdd" author="A" class="btn btn-success">新增</a>
        <a id="btnAdd" author="E" class="btn btn-info">编辑</a>
        <a id="btnDel" author="D" class="btn btn-danger">删除</a>
    </div>
    <div id="grid">
    </div>
</div>
<script>
    $(function () {

        $("#btnSearch").click(function () {
            search();
        });

        $("#btnAdd").click(function () {
            //js.openPage("/Menu/MenuList", "编辑界面");//增加tab
            js.windowOpen('菜单编辑界面', '/Sys/MenuEdit', 500, 300, false);
        });

        $("#btnDel").click(function () {
            dataExt.getSelectIds();
        });

        function search(gridId, parameter) {

            dataExt.loadGrid();
        }

        var reportName = "Sys_GetMenuList";
        var dataUrl = "/Common/GetPageData?reportName=" + reportName;

        $('#grid').LineGrid({
            url: "/Common/GetPageData?reportName=" + reportName,
            queryParams: {},
            singleSelect: false,
            fitColumns: true,
            columns: [[
                { field: 'ck', title: '选择', checkbox: true },
                { field: 'id', title: '编号', align: 'center', width: 100 },
                { field: "name", title: "名称", align: 'center', width: 140 },
                { field: "url", title: "地址", align: 'center', width: 140 },
                { field: "icon", title: "图标", align: 'center', width: 140 },
                { field: "sort", title: "排序", align: 'center', width: 140 },
                { field: "createTime", title: "创建时间", align: 'center', width: 180 },
            ]]
        });




        function opFormat(value, row) {
            var html = "";
            html += "<a href=\"javascript:void(0)\" class=\"btn btn-xs btn-info\" onclick=\"\">编辑</a>";
            return html;
        }


    });

</script>



